//vue异步组件和webpack的【代码分块点】功能结合，实现了按需加载
import App from '../App'


const login = () => import(/* webpackChunkName:'login'*/"../page/login/login");
const wxlogin = () => import(/* webpackChunkName:'wxlogin'*/"../page/login/wxlogin");
const forgetPwd = () => import(/* webpackChunkName:'forgetPwd'*/"../page/forget/forgetPwd");
const modifyPwd = () => import(/* webpackChunkName:'modifyPwd'*/"../page/forget/modifyPwd");
const protocol = () => import(/* webpackChunkName:'protocol'*/"../page/login/protocol");
//首页
const index = () => import(/* webpackChunkName:'index'*/"../page/index/index");
const store = () => import(/* webpackChunkName:'store'*/"../page/index/store/store");
const mine = () => import(/* webpackChunkName:'mine'*/"../page/index/mine/mine");
const material = () => import(/* webpackChunkName:'material'*/"../page/material/material");


//银行卡
const bankManager = () => import(/* webpackChunkName:'bankManager'*/"../page/bank/bankManager");
const bankCardBind = () => import(/* webpackChunkName:'bankCardBind'*/"../page/bank/bind/bankCardBind");
const bankBindProcess2 = () => import(/* webpackChunkName:'bankBindProcess2'*/"../page/bank/bind/bankBindProcess2");
const bankBindSuccess = () => import(/* webpackChunkName:'bankBindSuccess'*/"../page/bank/bind/bankBindSuccess");
const authDrawPwd = () => import(/* webpackChunkName:'authDrawPwd'*/"../page/bank/authDrawPwd");
//银行卡-换绑
const bankCardUnBind = () => import(/* webpackChunkName:'bankCardUnBind'*/"../page/bank/unbind/bankCardUnBind");
const bankUnBindProcess2 = () => import(/* webpackChunkName:'bankUnBindProcess2'*/"../page/bank/unbind/bankUnBindProcess2");
//银行卡-修改提现密码
const modifyDrawPwd = () => import(/* webpackChunkName:'modifyDrawPwd'*/"../page/bank/drawpwd/modifyDrawPwd");

//门店
const qrCode = () => import(/* webpackChunkName:'qrCode'*/"../page/shop/qrcode/qrCode");
const applyStore = () => import(/* webpackChunkName:'applyStore'*/"../page/shop/apply/applyStore");
const applyStoreRecord = () => import(/* webpackChunkName:'applyStoreRecord'*/"../page/shop/apply/applyStoreRecord");
const assistantList = () => import(/* webpackChunkName:'assistant'*/"../page/shop/shopassistant/assistantList");
const shopInvite = () => import(/* webpackChunkName:'assistant'*/"../page/shop/shopassistant/shopInvite");
const shopInviteRecord = () => import(/* webpackChunkName:'assistant'*/"../page/shop/shopassistant/shopInviteRecord");
const workerList = () => import(/* webpackChunkName:'workerList'*/"../page/shop/worker/workerList");
const staffList = () => import(/* webpackChunkName:'workerList'*/"../page/shop/staff/staffList");
const staffSearchPage = () => import(/* webpackChunkName:'workerList'*/"../page/shop/staff/staffSearchPage");


//提现
const deposit = () => import(/* webpackChunkName:'deposit'*/"../page/deposit/deposit");
const depositSuccess = () => import(/* webpackChunkName:'depositSuccess'*/"../page/deposit/depositSuccess");
const depositDetail = () => import(/* webpackChunkName:'depositDetail'*/"../page/deposit/depositDetail");
const accountDetail = () => import(/* webpackChunkName:'accountDetail'*/"../page/deposit/account/accountDetail");
const billCostDetail = () => import(/* webpackChunkName:'billCostDetail'*/"../page/deposit/account/billCostDetail");

//消息
const message = () => import(/* webpackChunkName:'message'*/"../page/message/message");
const messageDetail = () => import(/* webpackChunkName:'messageDetail'*/"../page/message/messageDetail");

//企业推荐
const companyReferrer = () => import(/* webpackChunkName:'companyReferrer'*/"../page/company/companyReferrer");


export default [{
  path: '/',
  component: App, //顶层路由，对应index.html
  children: [ //二级路由，对应App.vue
    {
      path: "",
      redirect: "/login"
    },
    {
      path: '/login',
      component: login,
      meta: {
        title: '登录注册'
      }
    },
    {
      path: '/protocol',
      component: protocol,
      meta: {
        title: '用户注册协议'
      }
    },
    {
      path: '/wxlogin',
      component: wxlogin,
      meta: {
        title: '绑定手机号'
      }
    },
    {
      path: '/forgetPwd',
      component: forgetPwd,
      meta: {
        title: '忘记密码'
      }
    },
    {
      path: '/modifyPwd',
      component: modifyPwd,
      meta: {
        title: '登录密码修改'
      }
    },
    {
      path: '/material',
      component: material,
      meta: {
        title: '个人资料'
      }
    },
    {
      path: '/index',
      component: index,
      meta: {
        title: '个人中心'
      },
      children: [
        {
          path: "/store",
          component: store,
          name: "蓝聘门店",
          meta: {
            title: '蓝聘门店'
          }
        },
        {
          path: '/mine',
          component: mine,
          name: "个人中心",
          meta: {
            title: '个人中心'
          }
        },
        {
          path: '',
          redirect: '/mine'
        },
      ]
    },
    {
      path: '/bankManager',
      component: bankManager,
      meta: {
        title: '银行卡管理'
      }
    },
    {
      path: '/bankCardBind',
      component: bankCardBind,
      meta: {
        title: '银行卡绑定'
      }
    },
    {
      path: '/bankBindProcess2',
      component: bankBindProcess2,
      meta: {
        title: '银行卡绑定'
      }
    },
    {
      path: '/bankBindSuccess',
      component: bankBindSuccess,
      meta: {
        title: '银行卡绑定'
      }
    },
    {
      path: '/authDrawPwd',
      component: authDrawPwd,
      meta: {
        title: '修改提现密码'
      }
    },
    {
      path: '/bankCardUnBind',
      component: bankCardUnBind,
      meta: {
        title: '银行卡换绑'
      }
    },
    {
      path: '/bankUnBindProcess2',
      component: bankUnBindProcess2,
      meta: {
        title: '银行卡换绑'
      }
    },
    {
      path: '/modifyDrawPwd',
      component: modifyDrawPwd,
      meta: {
        title: '修改提现密码'
      }
    },
    {
      path: '/qrCode',
      component: qrCode,
      meta: {
        title: '门店二维码'
      }
    },
    {
      path: '/applyStore',
      component: applyStore,
      meta: {
        title: '门店申请'
      }
    },
    {
      path: '/applyStoreRecord',
      component: applyStoreRecord,
      meta: {
        title: '门店申请'
      }
    },
    {
      path: '/assistantList',
      component: assistantList,
      meta: {
        title: '店员管理'
      }
    },
    {
      path: '/shopInviteRecord',
      component: shopInviteRecord,
      meta: {
        title: '邀请记录'
      }
    },
    {
      path: '/workerList',
      component: workerList,
      meta: {
        title: '门店招工详情'
      }
    },
    {
      path: '/staffList',
      component: staffList,
      meta: {
        title: '我的员工'
      }
    },
    {
      path: '/staffSearchPage',
      component: staffSearchPage,
      meta: {
        title: '我的员工'
      }
    },
    {
      path: '/shopInvite',
      component: shopInvite,
      meta: {
        title: '店员邀请'
      }
    },
    {
      path: '/deposit',
      component: deposit,
      meta: {
        title: '提现'
      }
    },
    {
      path: '/depositSuccess',
      component: depositSuccess,
      meta: {
        title: '提现'
      }
    },
    {
      path: '/depositDetail',
      component: depositDetail,
      meta: {
        title: '提现详情'
      }
    },
    {
      path: '/accountDetail',
      component: accountDetail,
      meta: {
        title: '账户明细'
      }
    },
    {
      path: '/billCostDetail',
      component: billCostDetail,
      meta: {
        title: '账户详情'
      }
    },
    {
      path: '/message',
      component: message,
      meta: {
        title: '消息'
      }
    },
    {
      path: '/messageDetail',
      component: messageDetail,
      meta: {
        title: '消息详情'
      }
    },
    {
      path: '/companyReferrer',
      component: companyReferrer,
      meta: {
        title: '企业推荐'
      }
    },
  ]
}]



